getResource('head.html', function(result, data){
	if(result){
		document.getElementsByTagName("header")[0].innerHTML = data;
		updateCartSummary();
	}
});

getResource('foot.html', function(result, data){
	if(result){
		document.getElementsByTagName("footer")[0].innerHTML = data;
	}
});

function updateCartSummary(){
	document.getElementById("itemCount").textContent = cart.count();
	document.getElementById("itemSum").textContent = cart.sum();
}

